local jiahe = fk.CreateSkill{
    name = "wk_heg__jiahe_other&",
}

Fk:loadTranslationTable{
  ["wk_heg__jiahe_other&"] = "烽火图",
  [":wk_heg__jiahe_other&"] = "①出牌阶段限一次，你可将一张装备牌置于“缘江烽火图”上，称为“烽火”。<br>" ..
  "②准备阶段，你可根据“烽火”数量选择获得对应的技能直至其回合结束：<br>"..
  "不小于一，〖英姿〗；不小于二，〖好施〗；不小于三，〖涉猎〗；不小于四，〖度势〗；不小于五，可额外选择一项。",
}

jiahe:addEffect("active",{
  prompt = function()
    local targets = table.filter(Fk:currentRoom().alive_players, function(p)
      return p:getMark("@@wk_heg__huanglong_skill") ~= 0 end)
    return "#ld__jiahe_other:" .. targets[1].id
  end,
  can_use = function(self, player)
    local room = Fk:currentRoom()
    local targets = table.filter(room.alive_players, function(p)
      return p:getMark("@@wk_heg__huanglong_skill") ~= 0 end)
    local target = targets[1]
    return player:usedSkillTimes(jiahe.name, Player.HistoryPhase) == 0 and target and target:hasSkill("wk_heg__jiahe")
  end,
  card_num = 1,
  card_filter = function(self, player, to_select, selected)
    return #selected < 1 and Fk:getCardById(to_select).type == Card.TypeEquip
  end,
  target_num = 0,
  on_use = function(self, room, effect)
    local targets = table.filter(room.alive_players, function(p)
      return p:getMark("@@wk_heg__huanglong_skill") ~= 0 end)
    local target = targets[1]
    if target and target:hasSkill("wk_heg__jiahe") then
      target:broadcastSkillInvoke("jiahe",math.random(3, 4))
      target:addToPile("lord_fenghuo", effect.cards, true, jiahe.name)
    end
  end,
})

return jiahe